﻿using UnityEngine;
using UnityEditor;
[CustomPropertyDrawer(typeof(HexCoordinates))]
public class HexCoordinatesDrawer : PropertyDrawer
{
     public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
     {
          HexCoordinates hexCoordinates=new HexCoordinates(property.FindPropertyRelative("x").intValue,
               property.FindPropertyRelative("z").intValue);
          position= EditorGUI.PrefixLabel(position,label);
          GUI.Label(position,hexCoordinates.ToString());
     }
}
